package com.yskj.mwk.service;

import com.github.pagehelper.PageInfo;
import com.yskj.mwk.bean.*;
import org.springframework.web.bind.annotation.RequestParam;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

public interface ManagerService {
    Supplier loginManager(int type,String tell,String pwd);
    List<Map<String, Object>> getIndexTopData(int accountType, int accountId);
    Map<String, Object> getIndexLeftData(int accountType, int accountId);
    Map<String, Integer> getIndexRightData(int accountType, int accountId);
    Map<String, Object> getIndexBottomData(int accountType, int accountId,String searchMonth);
    PageInfo<Supplier> getSuppliersByPage(String name, int pageNum, int pageSize);
    int addSupplier(int supplierId,String supplierName,String supplierPhone,String supplierPwd,int supplierType,String supplierAddress,String supplierLxr);
    Supplier getSupplierDescById(int id);
    PageInfo<User> getUsersByPage(String name, String tell, int pageNum, int pageSize);
    PageInfo<Order> getOrdersByPage(int pageNum, int pageSize,int accountType, int accountId,String orderId,int orderStatus,String orderTime1,String orderTime2,String getPdfTime1,String getPdfTime2,String downloadTime1,String downloadTime2,String isDownload,String trackingNo);
    List<OrderDesc> getOrdersDescList(String orderId);
    PageInfo<Sort> getSortByPage(int pageNum, int pageSize,  int parentId);
    int deleteSortById(int id);
    int updateSortStatusById(int id,int isShow);
    int addSort(String iconPic,String name,int isShow,int level,int parentId,int type,int id);
    Sort getSortDescById(int id);
    PageInfo<GoodsSpuSale> getGoodsSpuSalePageByTime(String startTime, String endTime, String spuName,int pageNum, int pageSize);
    PageInfo<Goods> getGoodsPage(String spuName,int sort2Id,int publishStatus,int supplierId,int isDiy,int isPopular,int isNew,int level,int pageNum,int pageSize,int isJingxuan,int isMiaosha);
    List<Supplier> getAllSuppliers(String supplierName);
    List<Sort> getAllSorts(int parentId);
    Goods getGoodsById(int id);
    int addGoods(int spuId,String spuName,String spuDesc,int sort1Id,int sort2Id,int supplierId,int publishStatus,int isNew,int isPopular,int isDiy,int level,int minNum,double price,int sourceId,int isJingxuan,int isMiaosha,int isMatting,int isTwo);
    List<GoodsImage> getGoodsImageList(int id,int type);
    int addGoodsImage(int id,int type,int level,int spuId,String picUrl);
    int delGoodsImage(int id);
    GoodsImage getGoodsImageById(int id);
    PageInfo<GoodsSku> getGoodsSkuList(int id,int pageNum, int pageSize);
    int editGoodsSku(String ids,double salesPrice, double underlinedPrice,double costPrice, int enable, String skuPic,int stock);
    GoodsSku getGoodsSkuDescById(int id);
    Map<String, Object> getGoodsSpecById(int id);
    int updateGoodsSpec(int id,String spec);
    int editSupplierWuliuConfig(int supplierId,String jt_apiAccount,String jt_privateKey,String jt_customerCode,String jt_orderPassword,String sendAddress,String sendName,String sendTell,String sendProv,String sendCity,String sendArea);
    Logistics getSupplierWuliuConfig(int supplierId);
    PageInfo<TemplateSort> getTemplateImageByPage(int pageNum, int pageSize,int parentId,int type);
    int editTemplateImageByPage(String sortName,int isShow,int level,int id,int parentId,int type);
    int delTemplateImageByPage(int id);
    int updateTemplateImageSortStatus(int isShow,int id);
    PageInfo<TemplatePackage> getTemplatePackageByPage(int pageNum, int pageSize);
    int editTemplatePackageByPage(String name,int id);
    int delTemplatePackage(int id);

    PageInfo<TemplateImage> getTempImageByPage(int pageNum, int pageSize,int sortId,int type);
    int editTempImage(String templatePic,int sortId,int level,int id,int type);
    int delTempImage(int id);
    TemplateImage getTempImageDesc(int id);
    List<TemplatePackage> getTemplatePackages();

    String downloadPdf(String url,String orderId);

    int saveIndexMarketingPoster(String imageUrl);

    int checkOrderIsCanRefund(String orderId,double refundTotal);

    int getFen(String orderId,double refundTotal,int type);

    int saveRefunLogsToSql(OrdersRefund ordersRefund);

    void updateAfterStatus(String refund_id);

    int cancelWuliuOrder(int supplierId,String orderId,String wlOrderId);

    int addWuliuGuiji(String billCode,String scanTime,String scanType,String desc);

    void batchGetTrackingNo(String orderId);

    String printWaybill(String trackingNo,String url);

    OrderDescMa getOrderDesc(String orderId);

    void refreshWaitOrder();

    List<String> batchDownloadPdf(String orderId);

    List<Integer> getIndexManagerData(int accountType,int accountId);
}
